<?php
    if ($this->session->userdata('LOGGED_USR_ID') < 1) {
              redirect('');
    }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dashboard - Admin Template</title>
<link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>public/css/theme1.css" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>public/css/style.css" />
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="css/ie-sucks.css" />
<![endif]-->
<script language="javascript">
	var _base_url = '<?php echo base_url() ?>';
	var _site_url = '<?php echo site_url() ?>';
	var _language = 'es';
</script>

	<link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url(); ?>public/css/jqgrid/flex/grid.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url(); ?>public/css/jqgrid/jqModal.css" />
    <link href="<?php echo base_url(); ?>public/css/theme/ui.all.css" rel="stylesheet" type="text/css" />
    <link href="<?php echo base_url(); ?>public/css/jquery.alerts.css" rel="stylesheet" type="text/css" />
    <link href="<?php echo base_url(); ?>public/css/jquery.treeview.css" rel="stylesheet" type="text/css" />
    	<script src="<?php echo base_url(); ?>public/js/FusionMaps.js" type="text/javascript"></script>
		<style type="text/css">
	<!--
	body {
		font-family: Arial, Helvetica, sans-serif;
		font-size: 12px;
                width:auto;  height:auto;
               
	}
        #content{
         
          width:750px;  height:550px;  
            
            
        }
	-->
	</style>


	<script type="text/javascript" src="<?php echo base_url() ?>public/js/jquery.js"></script>
	<script type="text/javascript">
                $(document).ready(function(){
	                $("#commentForm").validate();
	                $(".msg_body").hide();
	                $(".msg_head").click(function(){
		            $(this).next(".msg_body").slideToggle(500);
	                });
                 });
     </script>
    <script type="text/javascript" src="<?php echo base_url() ?>public/js/app.js"></script>
     <script type="text/javascript" src="<?php echo base_url() ?>public/js/jquery.validate.min.js"></script>
    <script type="text/javascript" src="<?php echo base_url(); ?>public/js/jquery-ui.js"></script>
    <script type="text/javascript" src="<?php echo base_url(); ?>public/js/jquery.alerts.js"></script>
    
   
     

     <script src="<?php echo base_url(); ?>public/js/jquery.jqGrid.js" type="text/javascript"></script>
     
     <script src="<?php echo base_url(); ?>public/js/jqgrid/grid.base.js" type="text/javascript"></script>
     <script src="<?php echo base_url(); ?>public/js/jqgrid/grid.common.js" type="text/javascript"></script>
     <script src="<?php echo base_url(); ?>public/js/jqgrid/grid.formedit.js" type="text/javascript"></script>
     <script src="<?php echo base_url(); ?>public/js/jqgrid/grid.inlinedit.js" type="text/javascript"></script>
     <script src="<?php echo base_url(); ?>public/js/jqgrid/grid.celledit.js" type="text/javascript"></script>
     <script src="<?php echo base_url(); ?>public/js/jqgrid/grid.subgrid.js" type="text/javascript"></script>
     <script src="<?php echo base_url(); ?>public/js/jqgrid/grid.treegrid.js" type="text/javascript"></script>
     <script src="<?php echo base_url(); ?>public/js/jqgrid/grid.custom.js" type="text/javascript"></script>
     <script src="<?php echo base_url(); ?>public/js/jqgrid/grid.postext.js" type="text/javascript"></script>
     <script src="<?php echo base_url(); ?>public/js/jqgrid/grid.tbltogrid.js" type="text/javascript"></script>
     <script src="<?php echo base_url(); ?>public/js/jqgrid/grid.setcolumns.js" type="text/javascript"></script>
     <script src="<?php echo base_url(); ?>public/js/jqgrid/grid.locale-es.js" type="text/javascript"></script>
     
	<script src="<?php echo base_url(); ?>public/js/jqgrid/jqModal.js" type="text/javascript"></script>
	<script src="<?php echo base_url(); ?>public/js/jqgrid/jqDnR.js" type="text/javascript"></script>
	
	
	 <SCRIPT LANGUAGE="Javascript" SRC="<?php echo base_url(); ?>public/js/FusionCharts2.js"></SCRIPT>	
    <SCRIPT LANGUAGE="Javascript" SRC="<?php echo base_url(); ?>public/js/FusionCharts.js"></SCRIPT>
    <SCRIPT LANGUAGE="JavaScript">		

	var detailsChartLoaded=false;	
	

	function FC_Rendered(DOMId){
		switch(DOMId){
			case "ProductDetails":				
				detailsChartLoaded = true;
				break;			
		}
		return;
	}	
		
	function updateChart(year, catId){			
		if (detailsChartLoaded){
			var strURL = "Data_SalesByCatProd.php?year=" + year + "&catId=" + catId;			
			strURL = strURL + "&currTime=" + getTimeForURL();
			strURL = escape(strURL);
			var chartObj = getChartFromId("ProductDetails");			
			chartObj.setDataURL(strURL);		
		}else {
			alert("Please wait for the charts to load.");
			return;
		}
	}
	function getTimeForURL(){
		var dt = new Date();
		var strOutput = "";
		strOutput = dt.getHours() + "_" + dt.getMinutes() + "_" + dt.getSeconds() + "_" + dt.getMilliseconds();
		return strOutput;
	}
	</SCRIPT>	
	
	<!--  javaScript de textarea -->
<script type="text/javascript" src="<?php echo base_url() ?>public/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>	





</head>
<body>



	<div id="container">
    	<div id="header">
        	<h2>Company24h-Sistema de Control</h2>
      
        	<div id="usuariosss">
        	<center>
        	<strong>Usuario &nbsp;</strong><?php echo $this->session->userdata('LOGGED_USR_NAME');?>
        	<br/>
        	<strong>Responsable &nbsp;</strong><?php echo $this->session->userdata('LOGGED_RESPONSABLE');?>
        	<br/>
        	<a href="<?php  echo base_url()?>index.php/login/logout">Logout</a>
        	</center>
        	</div>
        	
     <div id="topmenu">
                <ul>
                   <li <?php if ($menutop == '1'): echo 'class="current"'; endif;?>><a href="<?php echo site_url().'/main_tran';?>">Seguimiento</a></li> 
                   <li <?php if ($menutop == '2'): echo 'class="current"'; endif;?> ><a href="<?php echo site_url().'/transaccionentrada';?>">Inbound</a></li>  
                   <li <?php if ($menutop == '3'): echo 'class="current"'; endif;?> ><a href="<?php echo site_url().'/controlInternoControler';?>">Control Interno</a></li>                 	
                   <li <?php if ($menutop == '7'): echo 'class="current"'; endif;?>><a href="<?php echo site_url().'/main_tran/psegimiento';?>">P Seguimiento</a></li>
                	<?php if ($this->session->userdata('LOGGED_DEPAR') == 2 || $this->session->userdata('LOGGED_DEPAR') == 1): ?>
                	   <li <?php if ($menutop == '4'): echo 'class="current"';endif;?>><a href="<?php echo site_url().'/transaccionentrada/pventas';?>">V Seguimiento</a></li> 
                    <?php endif;?>
                   <li <?php if ($menutop == '6'): echo 'class="current"'; endif;?>><a href="<?php echo site_url().'/gproduccion';?>">G Producci&oacute;n</a></li>    
                   <li <?php if ($menutop == '8'): echo 'class="current"'; endif;?>><a href="<?php echo site_url().'/gonapi';?>">G ONAPI</a></li>
                   <li <?php if ($menutop == '9'): echo 'class="current"'; endif;?>><a href="<?php echo site_url().'/gestionentrega';?>">Entrega</a></li>
                	<!--<li><a href="users.html">Tareas</a></li>
                    <li><a href="#">Ventas</a></li>-->
              </ul> 
   
          </div>
      </div>
        <div id="wrapper">
           
		 <div id="content" style="width:950px; height:1750px;" >
            	<?php $this->load->view($content_page)?>
            	
			</div>
			